<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" xmlns="http://www.w3.org/1999/xhtml"
	xml:lang="en" lang="en"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
<h:body>
	<ui:composition template="/protegido/main.xhtml">
		<ui:define name='conteudoPrincipal'>
			<h:outputScript library='javascripts'
				name="query.maskedinput-1.2.2.min.js" />
			<h:outputScript>
				$(document).ready(function() {
					$("#navigation li.matriculaAdm a").addClass("active");
					$("#navigation li").parent().find('li').removeClass("active");
					if ($("#matriculaAdm")){
						$("#matriculaAdm").addClass("active");
					}
				});
			</h:outputScript>
			<style type="text/css" media="screen">
form {
	height: auto;
}

form .item-passos {
	font-size: 18px;
	margin-bottom: 15px;
	padding-bottom: 0px;
}

#campos-aluno {
	width: 45%;
	min-height: inherit;
	height: inherit;
	overflow: hidden;
	float: left;
	padding-right: 25px;
	margin-left: 25px;
}

#campos-disciplina {
	width: 45%;
	min-height: inherit; margin-left : 0px; height : inherit;
	min-height: 230px; overflow : hidden; float : left; border-left : 1px
	solid #dfdfdf;
	padding-left: 30px;
	margin-left: 0px;
	height: inherit; min-height : 230px;
	overflow: hidden;
	float: left;
	border-left: 1px solid #dfdfdf;
}

form input[type="text"],form input[type="password"] {
	width: 230px;
}

form input.w30 {
	width: 30px;
}

form input.w80 {
	width: 75px;
}

form span {
	font-size: 10px;
	color: #666;
	margin-left: 5px;
}

form span a {
	font-size: 10px;
	font-weight: bold;
	color: red;
}

form input.w120 {
	width: 175px;
}

form .input-submit {
	text-align: right;
	margin-top: 30px;
}

.campo-form {
	margin-top: 5px;
	margin-left: 20px;
}

#statusAcessoUsu,#statusAcessoUsu * {
	border: none !important;
	padding: 0 !important;
	font-weight: normal;
}
</style>

			<div class="ui-widget">
				<h:messages id="msg"
					style="font-size: 12px; margin-top: 20px; margin-bottom: 20px; padding: 10px 0.7em;"
					class="ui-state-error ui-corner-all" />
			</div>

			<h2>Nova Matrícula</h2>
			<h:form id="novoMatriculaAdmin" prependId="false">
				<div id="campos-aluno">
					<div class="item-passos">.: Dados do Aluno</div>

					<div class="campo-form">
						<label for="matriculaAluno">Matrícula: *</label><br />
						<h:inputText type="text" name="matriculaAluno" class="text"
							value="#{matriculaMB.alunoSelecionado.matricula}"
							id="matriculaAluno" required="true" disabled="true" />
					</div>

					<div class="campo-form">
						<label for="nomeAluno">Nome: *</label><br />
						<h:inputText type="text" name="nomeAluno" class="text"
							value="#{matriculaMB.alunoSelecionado.nome}" id="nomeAluno"
							required="true" disabled="true" />
					</div>


					<div class="campo-form">
						<label for="emailaAluno">Email: *</label><br />
						<h:inputText type="text" name="emailaAluno" class="text"
							value="#{matriculaMB.alunoSelecionado.email}" id="emailaAluno"
							required="true" disabled="true" />
					</div>
				</div>

				<div id="campos-disciplina">
					<div class="item-passos">.: Dados da Disciplina</div>
					<div class="campo-form">
						<label for="disciplinaSelecionada">Nome: *</label><br />
						<h:selectOneMenu id="disciplinaSelecionada"
							name="disciplinaSelecionada"
							value="#{disciplinaSelecionadaId}" class="select"
							required="true">
							<f:selectItems value="#{matriculaMB.disciplinas}" var="d"
								itemValue="#{d.id}"
								itemLabel="#{d.nome}" />
						</h:selectOneMenu>
					</div>

					<div class="campo-form">
						<label for="situacao">Situação do Aluno: *</label><br />
						<h:selectOneMenu id="situacao" name="situacao"
							value="#{situacao}" class="select"
							required="true">
							<f:selectItems value="#{matriculaMB.situacoes}" var="s"
								itemValue="#{s}" itemLabel="#{s}" />
						</h:selectOneMenu>

					</div>
				</div>

				<div class="clearfix"></div>

				<p class="campo-form">
					<span>Todos os campos com o sinal * são obrigatórios</span> <br />
					<h:commandButton type="submit" name="salvar" class="submit"
						value="Salvar Alterações" id="salvar" update=":msg :novoMatriculaAdmin"
						action="#{matriculaMB.doSalvarMatricula(matriculaMB.alunoSelecionado.id,disciplinaSelecionadaId,situacao)}"
						onclick="this.value='Salvando... ';">
					</h:commandButton>
					<h:commandButton type="submit" name="cancelar" class="submit"
						style="min-width:109px;" value="Cancelar" id="cancelar"
						action="#{matriculaMB.doCancelar()}" immediate="true">
					</h:commandButton>
				</p>
			</h:form>
		</ui:define>
	</ui:composition>
</h:body>
</html>